package com.chinacoal.microservice.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import com.chinacoal.microservice.IndicatorClient;
import com.chinacoal.microservice.pojo.CcmsSmartleasingIndicator;
import com.chinacoal.microservice.service.IndicatorService;
import com.chinacoal.microservice.util.Result;
import com.chinacoal.microservice.util.UserLoginToken;

/**
 * 考核模块-指标管理控制类
 * @author wiilead
 *
 */
@RestController
public class IndicatorController implements IndicatorClient {
	@Autowired
	private IndicatorService indicatorService;

	/**
	 * 新增或修改指标
	 */
	@Override
	@UserLoginToken
	public Result addOrUpdateIndicator(CcmsSmartleasingIndicator indicator, String token) {
		// TODO Auto-generated method stub
		return indicatorService.addOrUpdateIndicator(indicator, token);
	}

	/**
	 * 查询所有指标
	 */
	@Override
	@UserLoginToken
	public Result<List<CcmsSmartleasingIndicator>> getIndicatorList() {
		// TODO Auto-generated method stub
		return indicatorService.getIndicatorList();
	}

	/**
	 * 删除指标
	 */
	@Override
	@UserLoginToken
	public Result deleteIndicator(String indicatorId) {
		// TODO Auto-generated method stub
		return indicatorService.deleteIndicator(indicatorId);
	}

}
